#ifndef PLAYER_HPP_INCLUDED
#define PLAYER_HPP_INCLUDED


struct PlayerEvent {
	enum Type {
		MoveLeft = 1,
		MoveRight,
		MoveUp,
		MoveDown,
		Action1,
		Action2,
		Quit,
		Count
	};
	
	PlayerEvent() { }
	PlayerEvent(int player, Type type, bool state): player(player), type(type), state(state) {
		
	}
	
	int player;
	Type type;
	bool state;
};

struct PlayerAction {
	PlayerAction(): state(false) { }
	
	enum Type {
		Key = 1,
		JoyAxisPositive,
		JoyAxisNegative,
		JoyButton
	};
	
	Type type;
	bool state;
	sf::Key::Code keyCode;
	unsigned int joyId;
	unsigned int joyButton;
	sf::Joy::Axis joyAxis;
};

struct Player {
	Player() {
		
	}
	
	Player(std::string name, int score, sf::Color color): name(name), score(score), color(color), computer(false) {
		
	}
	
	std::string name;
	int score;
	sf::Color color;
	bool computer;
	
	PlayerAction actions[PlayerEvent::Count];
};

#endif // PLAYER_HPP_INCLUDED
